﻿using System;

namespace Classes_of_Data_Types
{
        class Program
    {
        static void Main(string[] args)
        {
            //sbyte
            Console.WriteLine("sbyte");
            Console.WriteLine("Minimum Value of sbype = " + sbyte.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + sbyte.MaxValue);
            if (sbyte.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            sbyte sbyteV = new SByte();
            Console.WriteLine("Default Value of sbyte = " + sbyteV);

            label_sbyte:

            try
            {
                Console.WriteLine("Enter Value to Check");
                sbyteV = Convert.ToSByte(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_sbyte;
            }


            //short
            Console.WriteLine("\nshort");
            Console.WriteLine("Minimum Value of sbype = " + short.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + short.MaxValue);
            if (short.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            short shortV = new short();
            Console.WriteLine("Default Value of short = " + shortV);

        label_short:

            try
            {
                Console.WriteLine("Enter Value to Check");
                shortV = Convert.ToInt16(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_short;
            }


            //int
            Console.WriteLine("\nint");
            Console.WriteLine("Minimum Value of sbype = " + int.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + int.MaxValue);
            if (int.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            int intV = new int();
            Console.WriteLine("Default Value of int = " + intV);

        label_int:

            try
            {
                Console.WriteLine("Enter Value to Check");
                intV = Convert.ToInt32(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_int;
            }


            //long
            Console.WriteLine("\nlong");
            Console.WriteLine("Minimum Value of sbype = " + long.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + long.MaxValue);
            if (long.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            long longV = new long();
            Console.WriteLine("Default Value of long = " + longV);

        label_long:

            try
            {
                Console.WriteLine("Enter Value to Check");
                longV = Convert.ToInt64(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_long;
            }


            //float
            Console.WriteLine("\nfloat");
            Console.WriteLine("Minimum Value of sbype = " + float.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + float.MaxValue);
            if (float.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            float floatV = new float();
            Console.WriteLine("Default Value of float = " + floatV);

        label_float:

            try
            {
                Console.WriteLine("Enter Value to Check");
                floatV = Convert.ToSingle(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_float;
            }


            //double
            Console.WriteLine("\ndouble");
            Console.WriteLine("Minimum Value of sbype = " + double.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + double.MaxValue);
            if (double.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            double doubleV = new double();
            Console.WriteLine("Default Value of double = " + doubleV);

        label_double:

            try
            {
                Console.WriteLine("Enter Value to Check");
                doubleV = Convert.ToDouble(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_double;
            }


            //decimal
            Console.WriteLine("\ndecimal");
            Console.WriteLine("Minimum Value of sbype = " + decimal.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + decimal.MaxValue);
            if (decimal.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            decimal decimalV = new decimal();
            Console.WriteLine("Default Value of decimal = " + decimalV);

        label_decimal:

            try
            {
                Console.WriteLine("Enter Value to Check");
                decimalV = Convert.ToDecimal(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_decimal;
            }


            //byte
            Console.WriteLine("\nbyte");
            Console.WriteLine("Minimum Value of sbype = " + byte.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + byte.MaxValue);
            if (byte.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            byte byteV = new byte();
            Console.WriteLine("Default Value of byte = " + byteV);

        label_byte:

            try
            {
                Console.WriteLine("Enter Value to Check");
                byteV = Convert.ToByte(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_byte;
            }


            //ushort
            Console.WriteLine("\nushort");
            Console.WriteLine("Minimum Value of sbype = " + ushort.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + ushort.MaxValue);
            if (ushort.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            ushort ushortV = new ushort();
            Console.WriteLine("Default Value of ushort = " + ushortV);

        label_ushort:

            try
            {
                Console.WriteLine("Enter Value to Check");
                ushortV = Convert.ToUInt16(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_ushort;
            }


            //uint
            Console.WriteLine("\nuint");
            Console.WriteLine("Minimum Value of sbype = " + uint.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + uint.MaxValue);
            if (uint.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            uint uintV = new uint();
            Console.WriteLine("Default Value of uint = " + uintV);

        label_uint:

            try
            {
                Console.WriteLine("Enter Value to Check");
                uintV = Convert.ToUInt32(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_uint;
            }


            //ulong
            Console.WriteLine("\nulong");
            Console.WriteLine("Minimum Value of sbype = " + ulong.MinValue);
            Console.WriteLine("Maximum Value of sbype = " + ulong.MaxValue);
            if (ulong.MinValue < 0)
                Console.WriteLine("signed");
            else

                Console.WriteLine("unsigned");

            ulong ulongV = new ulong();
            Console.WriteLine("Default Value of ulong = " + ulongV);

        label_ulong:

            try
            {
                Console.WriteLine("Enter Value to Check");
                ulongV = Convert.ToUInt64(Console.ReadLine());
            }

            catch (OverflowException)
            {
                Console.WriteLine("\n==xx== Exception ==xx==\n");
                goto label_ulong;
            }




        }
    }
}
